home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
9-Digit Zip Code Directory
/
9-Digit Zip Code Directory (American Business Information) (ABIZIP-12).ISO
/
z4src.zip
/
CLPARM.HPP
< prev
next >
Wrap
C/C++ Source or Header
|
1993-08-24
|
4KB
|
125 lines
//----------------------------------------------------------------------------
// MODULE DESCRIPTION
//
// Module: clparm.hpp
// Title: C++ Class Libraries
// Notice: John M. Weeder
// Copyright (c) 1993. All rights reserved.
// This module contains proprietary information and should be
// treated as confidential.
//
//----------------------------------------------------------------------------
// MAINTENANCE HISTORY
//
// $Workfile$
// $Revision$
// $Author$
// $Date$
// $Log$
//
//----------------------------------------------------------------------------
// MODULE NARRATIVE
//
// This module contains code for the class CL_PARM.
//
// The code in this module may be written in C++ or C.
//
// This module is portable to:
// DOS 3.X+
// MS Windows 3.X+
// OS/2 2.X+
// OS/2 2.0 PM
//
// The following compilers are supported:
// MSC 6.0A
// MSC/C++ 7.0
// Borland C++ 3.1 for DOS
// Borland C++ 1.0 for OS/2 2.X
//
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
// Class CL_PARM
//----------------------------------------------------------------------------
#define CL_PARM_PARENT CL_OBJECT
class CLASSTYPE CL_PARM : public CL_PARM_PARENT
{
BOOL fValid; // Parm is valid
BOOL fText; // Parm is text
BOOL fNumeric; // Parm is numeric
LONG lVal; // Numeric value
LONG lMin, lMax; // Min/max value of numeric
CL_STRING strVal; // Text value
CL_STRING strName; // Name of parameter
public:
static PCSZ pcszParmName;
static PCSZ pcszGarbleName;
FN_M CL_PARM();
FN_M CL_PARM(RCCL_PARM);
virtual FN_M ~CL_PARM();
virtual BOOL FN_M Destroy(BOOL = TRUE);
BOOL FN_M Get(PCSZ = NULL, PCSZ = NULL);
BOOL FN_M Get(LONG, PCSZ = NULL);
static BOOL FN_M GetCfg(PBS_CFG);
virtual BOOL FN_M Initialize(SHORT = CL_INIT_ALL);
virtual BOOL FN_M IsError() const;
virtual BOOL FN_M IsNumeric() const
{
return fNumeric;
}
virtual BOOL FN_M IsValid() const;
BOOL FN_M MinMax(LONG = MIN_LONG, LONG = MAX_LONG);
PCSZ FN_M Name() const
{
return (PCSZ)strName;
}
RCCL_PARM FN_M operator=(RCCL_PARM);
RCCL_PARM FN_M operator=(BYTE);
RCCL_PARM FN_M operator=(CHAR);
RCCL_PARM FN_M operator=(LONG);
RCCL_PARM FN_M operator=(PCSZ);
RCCL_PARM FN_M operator=(PSZ);
RCCL_PARM FN_M operator=(SHORT);
RCCL_PARM FN_M operator=(ULONG);
RCCL_PARM FN_M operator=(USHORT);
FN_M operator BYTE() const;
FN_M operator CHAR() const;
FN_M operator LONG() const;
FN_M operator PCSZ() const;
FN_M operator PSZ() const;
FN_M operator SHORT() const;
FN_M operator ULONG() const;
FN_M operator USHORT() const;
FN_M operator RCL_STRING() const;
virtual BOOL FN_M Retrieve(PCSZ, PCSZ = NULL);
BOOL FN_M Set(PCSZ = NULL);
static BOOL FN_M SetCfg(PBS_CFG);
BOOL FN_MV SetName(PCSZ...);
virtual BOOL FN_M Store(PCSZ, PCSZ = NULL);
#if COMPILE_DEBUG
static VOID FN_M Print(PCCL_PARM = NULL, PCSZ = NULL, SIZET = 0);
static BOOL FN_M Test(SHORT = 0);
#endif
protected:
BOOL FN_M SetValue(LONG);
BOOL FN_M SetValue(PCSZ);
private:
static PCSZ pcszVersion;
static PCSZ pcszAccess;
static PCSZ pcszSerial;
static PCSZ pcszCopyright;
static PCSZ pcszId;
static PCSZ pcszName;
static PCSZ pcszRegister;
};
//----------------------------------------------------------------------------
//------------------------------- End of File --------------------------------
//----------------------------------------------------------------------------